<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->systemName;?></title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
</head>

<body>
	<div id="main">
		<div id="navigation">当前位置：<a href="<?php echo $this->projectUrl(array('action'=>'index'));?>">菜单列表</a> &gt; <span id="focus">编辑菜单</span></div>
		<div id="body">
			<div id="edit">
				<form id="editForm" name="editForm" method="post" action="">
					<table class="table">
						<tr>
							<td >名称</td>
							<td >链接</td>
							<td >模块 </td>
							<td >控制器</td>
							<td >动作</td>
							<td class="dataLine">其他查询字符</td>
							<td >可显？</td>
							<td>可用？</td>
							<td>类型</td>
							<td>排序（小到大）</td>
							<td >说明</td>
							<td >说明文档（格式为：name.docx）</td>
						</tr>

						<tr class="dataLine">
							<td><input name="name" type="text" class="input" id="name" value="<?php echo $this->row['name'];?>" size="10"/></td>
							<td><input name="isLink" type="checkbox" id="isLink" value="1" <?php echo $this->row['isLink'] == 1 ? ' checked="checked"' : '';?> /></td>
							<td><input name="module" type="text" class="input" id="module" value="<?php echo $this->row['module'];?>" size="10"/></td>
							<td><input name="controller" type="text" class="input" id="controller" value="<?php echo $this->row['controller'];?>" size="10"/></td>
							<td><input name="action" type="text" class="input" id="action" value="<?php echo $this->row['action'];?>" size="10"/></td>
							<td><input name="otherQueryString" type="text" class="input" id="otherQueryString" value="<?php echo $this->row['otherQueryString'];?>" size="15"/></td>
							<td><input name="isDisplay" type="checkbox" id="isDisplay" value="1" <?php echo $this->row['isDisplay'] == 1 ? ' checked="checked"' : '';?>/></td>
							<td><input name="status" type="checkbox" id="status" value="1" <?php echo $this->row['status'] == 1 ? ' checked="checked"' : '';?>/></td>
							<td><select name="type" id="type">
									<option value="1" <?php echo $this->row['type'] == 1 ? ' selected="selected"' : '';?>>产品</option>
									<option value="2" <?php echo $this->row['type'] == 2 ? ' selected="selected"' : '';?>>非产品</option>
								</select>							</td>
							<td><input name="sort" type="text" class="input checkInt" id="sort" value="<?php echo $this->row['sort'];?>" default="<?php echo $this->row['sort'];?>" size="5" /></td>
							<td><input name="notes" type="text" class="input" id="notes" value="<?php echo $this->row['notes'];?>" size="30" /></td><td><input name="helpUrl" type="text" class="input" id="helpUrl" value="<?php echo $this->row['helpUrl'];?>" size="30" /></td>
						</tr>
<script language="javascript">
$("#isLink").click(
	function ()
	{
		isLinkSet(this.checked);
	}
);
$(document).ready(function(){
	isLinkSet($("#isLink").attr('checked'));
});
</script>

						<tr>
							<td colspan="12"><input type="submit" name="button" id="button" value="提交" class="button" /> 
								注：如果不添加，请设置名称为空。</td>
						</tr>
					</table>
				  <input type="hidden" name="dataNum" id="dataNum" value=""/>
				</form>
			</div>
		</div>
</div>
<script language="javascript">
function isLinkSet(checked)
{
	if (checked == false) {
		$("#module").val('');
		$("#module").attr('disabled', true);
		$("#controller").val('');
		$("#controller").attr('disabled', true);
		$("#action").val('');
		$("#action").attr('disabled', true);
		$("#otherQueryString").val('');
		$("#otherQueryString").attr('disabled', true);
	} else {
		$("#module").attr('disabled', false);
		$("#controller").attr('disabled', false);
		$("#action").attr('disabled', false);
		$("#otherQueryString").attr('disabled', false);
	}
}
</script>
</body>
</html>